package com.tianji.learning.controller;

import com.tianji.common.domain.dto.PageDTO;
import com.tianji.learning.domain.query.ReplyPageQuery;
import com.tianji.learning.domain.vo.ReplyVO;
import com.tianji.learning.controller.service.IInteractionReplyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/replies")
@RequiredArgsConstructor
@Api(tags = "管理端-评论回答相关接口")
public class InteractionReplyAdminController {
    private final IInteractionReplyService replyService;
    @ApiOperation("分页查询评论")
    @GetMapping("/page")
    public PageDTO<ReplyVO> queryReplyPageAdmin(ReplyPageQuery query){
         return replyService.queryReplyPageAdmin(query);
    }
    @ApiOperation("隐藏评论")
    @PutMapping("/{id}/hidden/{hidden}")
    public void hiddenReplyAdmin(@PathVariable("id") Long id,@PathVariable("hidden") Boolean hidden){
        replyService.hiddenReplyAdmin(id,hidden);
    }
}
